package gtkwire;

public class GTKWireCommandRequestThread implements Runnable
{
	public void run()
	{
		GTKWireApp app = GTKWireApp.instance();
		app.startRequestTime();
		Object crdata = app.crObject;

		if( crdata instanceof String )
			app.sendCommand( app.crWidgetName, app.crCommand, (String) crdata );
		else if( crdata instanceof Integer )
			app.sendCommand( app.crWidgetName, app.crCommand,  ((Integer) crdata ).intValue() );
		else if( crdata instanceof int[] )
			app.sendCommand( app.crWidgetName, app.crCommand,  (int[]) crdata );
		else if( crdata instanceof String[] )
			app.sendCommand( app.crWidgetName, app.crCommand,  (String[]) crdata );
		else if( crdata instanceof Double )
			app.sendCommand( app.crWidgetName, app.crCommand, ((Double) crdata ).doubleValue() );
		else if( crdata instanceof Double[] )
			app.sendCommand( app.crWidgetName, app.crCommand, (Double[]) crdata );
		else if( crdata instanceof Boolean )
			app.sendCommand( app.crWidgetName, app.crCommand, ((Boolean)crdata).booleanValue() );
		else 
			app.sendCommand( app.crWidgetName, app.crCommand, new Object() );
	}

}//end class
